Skip to content

New checkpoint request protocol - #97

Merged
LucDeCaf merged 15 commits into
mainfrom
checkpoint-requests
Sep 8, 2026
Merged

LucDeCaf merged 15 commits into
mainfrom
checkpoint-requests

Conversation

@LucDeCaf

@LucDeCaf LucDeCaf commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Implements the new Checkpoint Requests protocol for .NET, using the other SDKs as reference (mostly JS and Kotlin).

This PR also includes a internal refactor to the StreamingSyncImplementation class, which shifts it closer to the Kotlin SDK's implementation rather than JavaScript's.

Justification: While C# syntax looks a lot like JavaScript syntax, C#/.NET acts a lot more like Kotlin/Java internally. The new implementation takes better advantage of C#'s Task model and is generally cleaner/easier to reason about.

Note that this uses strings for the checkpoint request ID despite C# having a fast, native 64-bit integer type. This is mostly for consistency with other internal APIs and to avoid any accidental public API changes, but I'd like to use longs for IDs in v1.

AI Usage

I used Claude Code to assist with the StreamingSyncImplementation refactor and with porting tests/test utils from Kotlin/JS to C#. I reviewed the changes manually.

@simolus3 simolus3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to leave a few early comments in case it helps. As far as the public API is concerned this looks good to me.

Comment thread PowerSync/PowerSync.Common/Client/Sync/Bucket/SqliteBucketStorage.cs Outdated
Comment thread PowerSync/PowerSync.Common/Client/Sync/Stream/CheckpointState.cs
Comment thread PowerSync/PowerSync.Common/Client/Sync/Stream/CheckpointState.cs Outdated
Comment thread PowerSync/PowerSync.Common/Client/Sync/CheckpointRequest.cs
@LucDeCaf LucDeCaf added the Product Visibility Contains user-facing updates that may need to be documented and/or announced label Sep 2, 2026
…dard2.0 runtime features, use manual locking in CheckpointStateSignals
@LucDeCaf
LucDeCaf marked this pull request as ready for review September 3, 2026 09:40
simolus3
simolus3 previously approved these changes Sep 7, 2026
Comment thread PowerSync/PowerSync.Common/Client/Sync/Stream/CheckpointState.cs Outdated
Comment thread PowerSync/PowerSync.Common/Client/Sync/Stream/StreamingSyncImplementation.cs Outdated
@LucDeCaf
LucDeCaf merged commit 29b0a86 into main Sep 8, 2026
6 checks passed
@LucDeCaf
LucDeCaf deleted the checkpoint-requests branch September 8, 2026 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Product Visibility Contains user-facing updates that may need to be documented and/or announced

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants